import { createSlice } from "@reduxjs/toolkit";

const countSlice = createSlice({
  //命名空间
  name:'counter',
  //初始状态
  initialState:{
    count:0
  },
  reducers:{
    increment(data){
      console.log(increment,'increment');
    },
    decrement(data){
      console.log(decrement,'decrement');
    }
  }

})

export default countSlice.reducer
console.log(countSlice.reducer,'countSlice.reducer');
export const {increment,decrement} = countSlice.actions
// console.log(increment,'increment');


